<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //输出四则运算的结果
        function computed(n,m,op){
            switch(op){
                case "+":return n + m;break;
                case "-":return n - m;break;
                case "*":return n * m;break;
                case "/":return n / m;break;
            }
        }

        var result = computed(3,5,"*");
        console.log(result);
    </script>
</body>
</html>